package com.yuw.hw20190410.test04;

public class ColaEmployee {
	// 属性
	private String empName;
	private int empBirthdayMonth;

	// 行为
	/**
	 * 计算员工工资：父类中，主要用于判断生日金福利是否算入工资中
	 * 
	 * @param month
	 * @return
	 */
	public double calculateSalary(int month) {
		if (this.empBirthdayMonth == month) {
			// 有生日金
			return 100;
		} else {
			// 没有生日金
			return 0;
		}

	}

	/**
	 * 输出工资信息
	 * 
	 * @param month 输出的月份
	 */
	public void printSalay(int month) {
		System.out.println(this.getEmpName() + "的工资为：" + this.calculateSalary(month));
	}

	public ColaEmployee() {
		super();
		// TODO Auto-generated constructor stub
	}

	public ColaEmployee(String empName, int empBirthdayMonth) {
		super();
		this.empName = empName;
		this.empBirthdayMonth = empBirthdayMonth;
	}

	public String getEmpName() {
		return empName;
	}

	public void setEmpName(String empName) {
		this.empName = empName;
	}

	public int getEmpBirthdayMonth() {
		return empBirthdayMonth;
	}

	public void setEmpBirthdayMonth(int empBirthdayMonth) {
		this.empBirthdayMonth = empBirthdayMonth;
	}

}
